1. Field of the Invention
The present invention relates to an information transfer method and system for transferring data between hosts such as personal computers and peripherals such as printers.
2. Related Background Art
It is well known that parallel I/F of Centronics Inc. (hereinafter called Centronics I/F) is widely used for parallel data transfer between hosts such as personal computers and peripherals such as printers.
Examples of the structure of a printer using Centronics I/F are disclosed in Japanese Patent Application Laid-open Nos. 58-117036 and 5-150914. With reference to FIG. 10, data transfer of conventional techniques will be described. In FIG. 10, reference numeral 1 represents a CPU, reference numeral 2 represents a ROM for storing CPU control programs, font data, and the like, reference numeral 3 represents a RAM, reference numeral 4 represents a Centronics I/F unit, reference numeral 5 represents a DMA controller, and reference numeral 6 represents a printer unit such as an ink jet printer. Working areas for a reception buffer and a print buffer are reserved in RAM 3. When information is supplied from an external host to the Centronics I/F unit 4, this I/F unit 4 interrupts CPU 1. During this interrupt process, CPU 1 reads the information from the Centronics I/F unit 4 and temporarily stores it in the reception buffer.
Next, CPU 1 fetches the information from the reception buffer, and if the information is command information, it executes the process corresponding to the command information, whereas if the information is print data such as image data and character code data, it executes a process such as font development and transfers the results to the print buffer. When necessary data is collected and loaded in the print buffer, the DMA controller 5 DMA transfers the data in the print buffer to the printer unit 6 which prints the data. Although a method has been proposed in which transmission information is directly DMA transferred to the reception buffer without the interrupt process, temporary storage of transmission information in the reception buffer is the same as the conventional method.
Centronics I/F does not stipulate a method of transferring data by discriminating between command information and print data information. Therefore, as described above, data read from the reception buffer is judged whether it is command information or print data information and thereafter a proper process is performed.
Some conventional apparatus with Centronics I/F use an nAutoFd signal as a control bit for discriminating between command information and data information, without using this signal for its original purpose (refer to IEEE P1284 D2. 00 September, 1993).
Extending Centronics I/F for uni-directional information transfer to bi-directional information transfer has been stipulated by IEEE as new parallel I/F Standard (IEEE P1284 Standard Signaling Method for a Bi-direction Parallel Peripheral Interface for Personal Computers).
Several communication modes are stipulated in IEEE P1284. Of these, an ECP mode stipulates a method of transferring data by discriminating between command information and data information in accordance with a signal on a signal line which discriminates between command information and data information. However, in a nibble mode or a byte mode using a compatibility mode similar to conventional Centronics I/F for information transfer in an ordinary direction, the signal line for discriminating between command information and data information is not provided so that command information and data information cannot be discriminated.
The ECP mode further stipulates a method of issuing an information transfer request from a peripheral to a host by using an nPeriphRequest signal. However, in the nibble mode or byte mode using a compatibility mode similar to conventional Centronics I/F for information transfer in an ordinary direction, a method of issuing an information transfer request from a peripheral in the reverse direction is not specifically stipulated.
With the above-described conventional techniques, command information and data information are sent without discriminating therebetween, and they are discriminated for the first time when they are read from the reception buffer. It is therefore difficult to transfer command information which requires an immediate process execution. Furthermore, if some abnormal state occurs at the apparatus so that data information cannot be processed (e.g., if recording sheets, ink, or the like of the printer runs out) and the apparatus stops with the reception buffer being in a full-state, command information itself cannot be transferred thereafter.
If the nAutoFd signal is used as a control bit for discriminating between command information and data information, the above disadvantage can be eliminated. However, this nAutoFd signal plays an important roll as a trigger signal on negotiation in IEEE P1284. This command information transfer method cannot be used together with protocols of IEEE P1284 which realizes bi-directional information transfer.
As described above, in the nibble mode or byte mode using a compatibility mode similar to conventional Centronics I/F for information transfer in the normal direction, a method of issuing an information transfer request from a peripheral in the reverse direction is not specifically stipulated. Accordingly, even if an abnormal state occurs at a peripheral (e.g., if recording sheets, ink, or the like of the printer runs out) and this is to be immediately notified to the host, it is not possible to request a reverse direction information transfer from the host, and this notice stands by until the communication mode transitions to the nibble or byte mode.